package com.fansl.allround.study.designpattern.singleton;

import lombok.Getter;
import lombok.Setter;

/**
 * @author fansl
 * @Description: 饿汉模式
 * @date 2019/10/11 11:16
 */
public class ImmediateSingleton {
    @Getter
    @Setter
    private String name;
    private ImmediateSingleton(){

    }
    private static ImmediateSingleton immediateSingleton = new ImmediateSingleton();

    public static ImmediateSingleton getImmediateSingleton(){
        return immediateSingleton;
    }
}
